package com.fau.om.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.json.simple.JSONAware;
import org.json.simple.JSONObject;


/**
 * @desc 物流公司表
 * @author liy
 * @datetime 2014年9月12日,上午10:39:54
 */
@Entity
@Table(name = "medical_logistics")
public class MedicalLogistics implements Serializable,JSONAware {

	private static final long serialVersionUID = -7108594688928543536L;

	private String id;
	private String name;			// 公司名称
	private String serialNum;		// 编号
	private String abbreviation;	// 公司名称缩写
	private String genCha;			// 是否代收费
	private String cooperation;		// 是否合作中
	private String website;			// 网址
	private String phone;			// 联系电话
	private String fax;				// 传真
	private String conPeo;			// 联系人
	private String remark;			// 备注
	private String hospitalId;      // 医院ID

	private Date createTime = new Date();	// 创建时间
	private Date updateTime = new Date();	// 修改时间
	
	@Id
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	@Column(name = "id", length = 32)
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "name", length = 50)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "serial_num", length = 20)
	public String getSerialNum() {
		return serialNum;
	}

	public void setSerialNum(String serialNum) {
		this.serialNum = serialNum;
	}

	@Column(name = "abbreviation", length = 20)
	public String getAbbreviation() {
		return abbreviation;
	}

	public void setAbbreviation(String abbreviation) {
		this.abbreviation = abbreviation;
	}

	@Column(name = "gen_cha", length = 5)
	public String getGenCha() {
		return genCha;
	}

	public void setGenCha(String genCha) {
		this.genCha = genCha;
	}

	@Column(name = "cooperation", length = 5)
	public String getCooperation() {
		return cooperation;
	}

	public void setCooperation(String cooperation) {
		this.cooperation = cooperation;
	}

	@Column(name = "website", length = 255)
	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	@Column(name = "phone", length = 20)
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "fax", length = 20)
	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	@Column(name = "con_peo", length = 30)
	public String getConPeo() {
		return conPeo;
	}

	public void setConPeo(String conPeo) {
		this.conPeo = conPeo;
	}

	@Column(name = "remark", length = 255)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_time")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	@Column(name = "hospital_id", length = 32)
	public String getHospitalId() {
		return hospitalId;
	}

	public void setHospitalId(String hospitalId) {
		this.hospitalId = hospitalId;
	}

	@SuppressWarnings("unchecked")
	@Override
	public String toJSONString() {
		JSONObject obj=new JSONObject();
		obj.put("id", id);
		obj.put("name", name);
		obj.put("serialNum", serialNum);
		obj.put("abbreviation", abbreviation);
		obj.put("genCha", genCha);
		obj.put("cooperation", cooperation);
		obj.put("website", website);
		obj.put("phone", phone);
		obj.put("fax", fax);
		obj.put("conPeo", conPeo);
		obj.put("remark", remark);
		
		return obj.toString();
	}
	

}
